#ifndef encoder_H
#define encoder_H

#include "zf_common_headfile.h"

extern double encoder_data_f_l;
extern double encoder_data_f_r;
extern double encoder_data_b_l;
extern double encoder_data_b_r;

#define ENCODER_DIR_F_L (QTIMER3_ENCODER2)
#define ENCODER_QUADDEC_A_F_L (QTIMER3_ENCODER2_CH1_B18)
#define ENCODER_DIR_B_F_L (QTIMER3_ENCODER2_CH2_B19)

#define ENCODER_DIR_F_R (QTIMER2_ENCODER1)
#define ENCODER_QUADDEC_A_F_R (QTIMER2_ENCODER1_CH1_C3)
#define ENCODER_DIR_B_F_R (QTIMER2_ENCODER1_CH2_C25)

#define ENCODER_DIR_B_L (QTIMER1_ENCODER1)
#define ENCODER_QUADDEC_A_B_L (QTIMER1_ENCODER1_CH1_C0)
#define ENCODER_DIR_B_B_L (QTIMER1_ENCODER1_CH2_C1)

#define ENCODER_DIR_B_R (QTIMER1_ENCODER2)
#define ENCODER_QUADDEC_A_B_R (QTIMER1_ENCODER2_CH1_C2)
#define ENCODER_DIR_B_B_R (QTIMER1_ENCODER2_CH2_C24)

void encoder_init(void);

void print_encoder_data(void);

#endif